<template>
  <!-- 主播电台 -->
  <div class="box">
    <div class="sllde">
      <el-carousel trigger="click" :interval="4000" type="card" height="185px">
        <el-carousel-item v-for="item in datalist" :key="item.index">
          <img :src="item.pic" />
          <div class="zj">{{item.typeTitle}}</div>
          <div class="parent">
            <div class="zj">{{item.typeTitle}}</div>
          </div>
        </el-carousel-item>
      </el-carousel>
    </div>
    <div>
      <h4>
        <h3 class="title">付费精品<i class="el-icon-arrow-right"></i></h3>
        <vip></vip>

        <h3 class="title">电台个性推荐<i class="el-icon-arrow-right"></i></h3>
        <dation></dation>

        <h3 class="title">创作翻唱<i class="el-icon-arrow-right"></i></h3>
        <cover></cover>

        <h3 class="title">声之剧场<i class="el-icon-arrow-right"></i></h3>
        <theatre></theatre>
        <div class="d"></div>
      </h4>
    </div>
  </div>
</template>
<script>
// 轮播组件
// 组件
import axios from "axios";
import { API } from "../../../common/constant";

import vip from "./vip";
import dation from "./dation";
import cover from "./cover";
import theatre from "./theatre";

export default {
  components: {
    vip,
    dation,
    cover,
    theatre,
  },
  data() {
    return {
      datalist: [],
    };
  },
  mounted() {
    axios({
      url: `${API}/dj/banner`,
      method: "get",
    }).then((res) => {
      console.log(res);
      this.datalist = res.data.data;
    });
  },
};
</script>
<style scoped>
/* 页面 */
.box {
  position: relative;
  top: 130px;
  left: 200px;
}
h4 a {
  color: #000;
  text-decoration: none;
}
h4 {
  margin-left: 30px;
}
.sllde {
  margin-left: 10px;
}
.box {
  display: block;
  position: relative;
  top: 130px;
  left: 200px;
}
.el-carousel__item {
  border-radius: 15px;
}
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
.sllde img {
  width: 100%;
  position: relative;
  border-radius: 15px;
}
.sllde .parent {
  height: 23px;
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: #cc4a4a;
  border-radius: 10px 0px 10px 0px;
}
.sllde .parent .zj {
  margin: 0 10px;
  color: #fff;
  text-align: center;
  line-height: 23px;
  font-size: 15px;
}
.sllde .parent:nth-child() {
  background-color: #cc4a4a;
}
.d {
  height: 100px;
}
</style>
